package com.hydra.base.feign;

import com.hydra.base.resp.Response;
import com.hydra.jres.interceptor.FeignInterceptor;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * 邮件服务类的第三方远程调用接口
 * 注意，FeignClient注解的url加个冒号是为了允许读取的配置不存在时赋空值
 */
@Component
@FeignClient(
        value="${feign.service.bbs-service.name}",
        url="${feign.service.bbs-service.url:}",
        contextId = "bbs-service",
        configuration = FeignInterceptor.class
)
public interface TestOpenFeignService {

    /**
     * 测试
     */
    @GetMapping("/api/bbs/catalog/getById")
    Response test(@RequestParam("id") String id);


}
